using System.Collections;
using Rdl;

namespace GTame.ReportParser
{

    public class SeriesGroupingType
    {

        private GTame.ReportParser.DynamicSeriesType _DynamicSeries;
        private GTame.ReportParser.StaticSeriesType _StaticSeries;

        public GTame.ReportParser.DynamicSeriesType DynamicSeries
        {
            get
            {
                if (_DynamicSeries == null)
                    _DynamicSeries = new GTame.ReportParser.DynamicSeriesType();
                return _DynamicSeries;
            }
            set
            {
                _DynamicSeries = value;
            }
        }

        public GTame.ReportParser.StaticSeriesType StaticSeries
        {
            get
            {
                if (_StaticSeries == null)
                    _StaticSeries = new GTame.ReportParser.StaticSeriesType();
                return _StaticSeries;
            }
            set
            {
                _StaticSeries = value;
            }
        }

        public SeriesGroupingType()
        {
        }

        public Rdl.SeriesGroupingType Write()
        {
            Rdl.SeriesGroupingType seriesGroupingType = new Rdl.SeriesGroupingType();
            System.Collections.ArrayList arrayList = new System.Collections.ArrayList();
            if (_DynamicSeries != null)
                arrayList.Add(_DynamicSeries.Write());
            if (_StaticSeries != null)
                arrayList.Add(_StaticSeries.Write());
            seriesGroupingType.Items = arrayList.ToArray();
            arrayList = null;
            return seriesGroupingType;
        }

    } // class SeriesGroupingType

}

